home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / Script.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  36.8 KB  |  914 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Script.h
  3.  
  4.      Contains:    Script Manager interfaces
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __SCRIPT__
  21. #define __SCRIPT__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __QUICKDRAW__
  30. #include <Quickdraw.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33. /*    #include <QuickdrawText.h>                                    */
  34.  
  35. #ifndef __INTLRESOURCES__
  36. #include <IntlResources.h>
  37. #endif
  38.  
  39. #ifndef __EVENTS__
  40. #include <Events.h>
  41. #endif
  42. /*    #include <OSUtils.h>                                        */
  43. /*        #include <Memory.h>                                        */
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48.  
  49. #if PRAGMA_ALIGN_SUPPORTED
  50. #pragma options align=mac68k
  51. #endif
  52.  
  53. #if PRAGMA_IMPORT_SUPPORTED
  54. #pragma import on
  55. #endif
  56.  
  57.  
  58. enum {
  59. /* Script System constants */
  60.     smSystemScript                = -1,                            /*designates system script.*/
  61.     smCurrentScript                = -2,                            /*designates current font script.*/
  62.     smAllScripts                = -3,                            /*designates any script    */
  63.     smRoman                        = 0,                            /*Roman*/
  64.     smJapanese                    = 1,                            /*Japanese*/
  65.     smTradChinese                = 2,                            /*Traditional Chinese*/
  66.     smKorean                    = 3,                            /*Korean*/
  67.     smArabic                    = 4,                            /*Arabic*/
  68.     smHebrew                    = 5,                            /*Hebrew*/
  69.     smGreek                        = 6,                            /*Greek*/
  70.     smCyrillic                    = 7,                            /*Cyrillic*/
  71.     smRSymbol                    = 8,                            /*Right-left symbol*/
  72.     smDevanagari                = 9,                            /*Devanagari*/
  73.     smGurmukhi                    = 10,                            /*Gurmukhi*/
  74.     smGujarati                    = 11,                            /*Gujarati*/
  75.     smOriya                        = 12,                            /*Oriya*/
  76.     smBengali                    = 13,                            /*Bengali*/
  77.     smTamil                        = 14,                            /*Tamil*/
  78.     smTelugu                    = 15,                            /*Telugu*/
  79.     smKannada                    = 16,                            /*Kannada/Kanarese*/
  80.     smMalayalam                    = 17                            /*Malayalam*/
  81. };
  82.  
  83. enum {
  84.     smSinhalese                    = 18,                            /*Sinhalese*/
  85.     smBurmese                    = 19,                            /*Burmese*/
  86.     smKhmer                        = 20,                            /*Khmer/Cambodian*/
  87.     smThai                        = 21,                            /*Thai*/
  88.     smLaotian                    = 22,                            /*Laotian*/
  89.     smGeorgian                    = 23,                            /*Georgian*/
  90.     smArmenian                    = 24,                            /*Armenian*/
  91.     smSimpChinese                = 25,                            /*Simplified Chinese*/
  92.     smTibetan                    = 26,                            /*Tibetan*/
  93.     smMongolian                    = 27,                            /*Mongolian*/
  94.     smGeez                        = 28,                            /*Geez/Ethiopic*/
  95.     smEthiopic                    = 28,                            /*Synonym for smGeez*/
  96.     smEastEurRoman                = 29,                            /*Synonym for smSlavic*/
  97.     smCentralEuroRoman            = smEastEurRoman,                /* another synonym */
  98.     smVietnamese                = 30,                            /*Vietnamese*/
  99.     smExtArabic                    = 31,                            /*extended Arabic*/
  100.     smUninterp                    = 32,                            /*uninterpreted symbols, e.g. palette symbols*/
  101.     smKlingon                    = 32,                            /*Klingon*/
  102. /*Obsolete names for script systems (kept for backward compatibility)*/
  103.     smChinese                    = 2,                            /*(use smTradChinese or smSimpChinese)*/
  104.     smRussian                    = 7,                            /*(old name for smCyrillic)*/
  105. /* smMaldivian = 25;         (no more smMaldivian!)*/
  106.     smAmharic                    = 28,                            /*(old name for smGeez)*/
  107.     smSlavic                    = 29                            /*(old name for smEastEurRoman)*/
  108. };
  109.  
  110. enum {
  111.     smSindhi                    = 31,                            /*(old name for smExtArabic)*/
  112. /* Language Codes */
  113.     langEnglish                    = 0,                            /* smRoman script */
  114.     langFrench                    = 1,                            /* smRoman script */
  115.     langGerman                    = 2,                            /* smRoman script */
  116.     langItalian                    = 3,                            /* smRoman script */
  117.     langDutch                    = 4,                            /* smRoman script */
  118.     langSwedish                    = 5,                            /* smRoman script */
  119.     langSpanish                    = 6,                            /* smRoman script */
  120.     langDanish                    = 7,                            /* smRoman script */
  121.     langPortuguese                = 8,                            /* smRoman script */
  122.     langNorwegian                = 9,                            /* smRoman script */
  123.     langHebrew                    = 10,                            /* smHebrew script */
  124.     langJapanese                = 11,                            /* smJapanese script */
  125.     langArabic                    = 12,                            /* smArabic script */
  126.     langFinnish                    = 13,                            /* smRoman script */
  127.     langGreek                    = 14,                            /* smGreek script */
  128.     langIcelandic                = 15,                            /* extended Roman script */
  129.     langMaltese                    = 16,                            /* extended Roman script */
  130.     langTurkish                    = 17,                            /* extended Roman script */
  131.     langCroatian                = 18,                            /* Serbo-Croatian in extended Roman script */
  132.     langTradChinese                = 19                            /* Chinese in traditional characters */
  133. };
  134.  
  135. enum {
  136.     langUrdu                    = 20,                            /* smArabic script */
  137.     langHindi                    = 21,                            /* smDevanagari script */
  138.     langThai                    = 22,                            /* smThai script */
  139.     langKorean                    = 23,                            /* smKorean script */
  140.     langLithuanian                = 24,                            /* smEastEurRoman script */
  141.     langPolish                    = 25,                            /* smEastEurRoman script */
  142.     langHungarian                = 26,                            /* smEastEurRoman script */
  143.     langEstonian                = 27,                            /* smEastEurRoman script */
  144.     langLettish                    = 28,                            /* smEastEurRoman script */
  145.     langLatvian                    = 28,                            /* Synonym for langLettish */
  146.     langSaamisk                    = 29,                            /* ext. Roman script, lang. of the Sami/Lapp people of Scand. */
  147.     langLappish                    = 29,                            /* Synonym for langSaamisk */
  148.     langFaeroese                = 30,                            /* smRoman script */
  149.     langFarsi                    = 31,                            /* smArabic script */
  150.     langPersian                    = 31,                            /* Synonym for langFarsi */
  151.     langRussian                    = 32,                            /* smCyrillic script */
  152.     langSimpChinese                = 33,                            /* Chinese in simplified characters */
  153.     langFlemish                    = 34,                            /* smRoman script */
  154.     langIrish                    = 35,                            /* smRoman script */
  155.     langAlbanian                = 36                            /* smRoman script */
  156. };
  157.  
  158. enum {
  159.     langRomanian                = 37,                            /* smEastEurRoman script */
  160.     langCzech                    = 38,                            /* smEastEurRoman script */
  161.     langSlovak                    = 39,                            /* smEastEurRoman script */
  162.     langSlovenian                = 40,                            /* smEastEurRoman script */
  163.     langYiddish                    = 41,                            /* smHebrew script */
  164.     langSerbian                    = 42,                            /* Serbo-Croatian in smCyrillic script */
  165.     langMacedonian                = 43,                            /* smCyrillic script */
  166.     langBulgarian                = 44,                            /* smCyrillic script */
  167.     langUkrainian                = 45,                            /* smCyrillic script */
  168.     langByelorussian            = 46,                            /* smCyrillic script */
  169.     langUzbek                    = 47,                            /* smCyrillic script */
  170.     langKazakh                    = 48,                            /* smCyrillic script */
  171.     langAzerbaijani                = 49,                            /* Azerbaijani in smCyrillic script (USSR) */
  172.     langAzerbaijanAr            = 50,                            /* Azerbaijani in smArabic script (Iran) */
  173.     langArmenian                = 51,                            /* smArmenian script */
  174.     langGeorgian                = 52,                            /* smGeorgian script */
  175.     langMoldavian                = 53,                            /* smCyrillic script */
  176.     langKirghiz                    = 54,                            /* smCyrillic script */
  177.     langTajiki                    = 55,                            /* smCyrillic script */
  178.     langTurkmen                    = 56                            /* smCyrillic script */
  179. };
  180.  
  181. enum {
  182.     langMongolian                = 57,                            /* Mongolian in smMongolian script */
  183.     langMongolianCyr            = 58,                            /* Mongolian in smCyrillic script */
  184.     langPashto                    = 59,                            /* smArabic script */
  185.     langKurdish                    = 60,                            /* smArabic script */
  186.     langKashmiri                = 61,                            /* smArabic script */
  187.     langSindhi                    = 62,                            /* smExtArabic script */
  188.     langTibetan                    = 63,                            /* smTibetan script */
  189.     langNepali                    = 64,                            /* smDevanagari script */
  190.     langSanskrit                = 65,                            /* smDevanagari script */
  191.     langMarathi                    = 66,                            /* smDevanagari script */
  192.     langBengali                    = 67,                            /* smBengali script */
  193.     langAssamese                = 68,                            /* smBengali script */
  194.     langGujarati                = 69,                            /* smGujarati script */
  195.     langPunjabi                    = 70,                            /* smGurmukhi script */
  196.     langOriya                    = 71,                            /* smOriya script */
  197.     langMalayalam                = 72,                            /* smMalayalam script */
  198.     langKannada                    = 73,                            /* smKannada script */
  199.     langTamil                    = 74,                            /* smTamil script */
  200.     langTelugu                    = 75,                            /* smTelugu script */
  201.     langSinhalese                = 76                            /* smSinhalese script */
  202. };
  203.  
  204. enum {
  205.     langBurmese                    = 77,                            /* smBurmese script */
  206.     langKhmer                    = 78,                            /* smKhmer script */
  207.     langLao                        = 79,                            /* smLaotian script */
  208.     langVietnamese                = 80,                            /* smVietnamese script */
  209.     langIndonesian                = 81,                            /* smRoman script */
  210.     langTagalog                    = 82,                            /* smRoman script */
  211.     langMalayRoman                = 83,                            /* Malay in smRoman script */
  212.     langMalayArabic                = 84,                            /* Malay in smArabic script */
  213.     langAmharic                    = 85,                            /* smEthiopic script */
  214.     langTigrinya                = 86,                            /* smEthiopic script */
  215.     langGalla                    = 87,                            /* smEthiopic script */
  216.     langOromo                    = 87,                            /* Synonym for langGalla */
  217.     langSomali                    = 88,                            /* smRoman script */
  218.     langSwahili                    = 89,                            /* smRoman script */
  219.     langRuanda                    = 90,                            /* smRoman script */
  220.     langRundi                    = 91,                            /* smRoman script */
  221.     langChewa                    = 92,                            /* smRoman script */
  222.     langMalagasy                = 93,                            /* smRoman script */
  223.     langEsperanto                = 94,                            /* extended Roman script */
  224.     langWelsh                    = 128                            /* smRoman script */
  225. };
  226.  
  227. enum {
  228.     langBasque                    = 129,                            /* smRoman script */
  229.     langCatalan                    = 130,                            /* smRoman script */
  230.     langLatin                    = 131,                            /* smRoman script */
  231.     langQuechua                    = 132,                            /* smRoman script */
  232.     langGuarani                    = 133,                            /* smRoman script */
  233.     langAymara                    = 134,                            /* smRoman script */
  234.     langTatar                    = 135,                            /* smCyrillic script */
  235.     langUighur                    = 136,                            /* smArabic script */
  236.     langDzongkha                = 137,                            /* (lang of Bhutan) smTibetan script */
  237.     langJavaneseRom                = 138,                            /* Javanese in smRoman script */
  238.     langSundaneseRom            = 139,                            /* Sundanese in smRoman script */
  239. /* Obsolete names, kept for backward compatibility */
  240.     langPortugese                = 8,                            /* old misspelled version, kept for compatibility */
  241.     langMalta                    = 16,                            /* old misspelled version, kept for compatibility */
  242.     langYugoslavian                = 18,                            /* (use langCroatian, langSerbian, etc.) */
  243.     langChinese                    = 19,                            /* (use langTradChinese or langSimpChinese) */
  244.     langLapponian                = 29                            /* Synonym for langSaamisk, not correct name */
  245. };
  246.  
  247. enum {
  248. /* Regional version codes */
  249.     verUS                        = 0,
  250.     verFrance                    = 1,
  251.     verBritain                    = 2,
  252.     verGermany                    = 3,
  253.     verItaly                    = 4,
  254.     verNetherlands                = 5,
  255.     verFrBelgiumLux                = 6,                            /* French for Belgium & Luxembourg */
  256.     verSweden                    = 7,
  257.     verSpain                    = 8,
  258.     verDenmark                    = 9,
  259.     verPortugal                    = 10,
  260.     verFrCanada                    = 11,
  261.     verNorway                    = 12
  262. };
  263.  
  264. enum {
  265.     verIsrael                    = 13,
  266.     verJapan                    = 14,
  267.     verAustralia                = 15,
  268.     verArabic                    = 16,                            /* synonym for verArabia */
  269.     verFinland                    = 17,
  270.     verFrSwiss                    = 18,                            /* French Swiss */
  271.     verGrSwiss                    = 19,                            /* German Swiss */
  272.     verGreece                    = 20,
  273.     verIceland                    = 21,
  274.     verMalta                    = 22,
  275.     verCyprus                    = 23,
  276.     verTurkey                    = 24,
  277.     verYugoCroatian                = 25,                            /* Croatian system for Yugoslavia */
  278.     verNetherlandsComma            = 26,
  279.     verBelgiumLuxPoint            = 27,
  280.     verCanadaComma                = 28,
  281.     verCanadaPoint                = 29,
  282.     vervariantPortugal            = 30,
  283.     vervariantNorway            = 31,
  284.     vervariantDenmark            = 32,
  285.     verIndiaHindi                = 33,                            /* Hindi system for India */
  286.     verPakistan                    = 34,
  287.     verTurkishModified            = 35,
  288.     verRomania                    = 39,
  289.     verGreekAncient                = 40,
  290.     verLithuania                = 41,
  291.     verPoland                    = 42,
  292.     verHungary                    = 43,
  293.     verEstonia                    = 44,
  294.     verLatvia                    = 45
  295. };
  296.  
  297. enum {
  298.     verLapland                    = 46,
  299.     verFaeroeIsl                = 47,
  300.     verIran                        = 48,
  301.     verRussia                    = 49,
  302.     verIreland                    = 50,                            /* English-language version for Ireland */
  303.     verKorea                    = 51,
  304.     verChina                    = 52,
  305.     verTaiwan                    = 53,
  306.     verThailand                    = 54,
  307.     verCzech                    = 56,
  308.     verSlovak                    = 57,
  309.     verGenericFE                = 58,
  310.     verMagyar                    = 59,
  311.     verBengali                    = 60,
  312.     verByeloRussian                = 61,
  313.     verUkrania                    = 62,
  314.     verItalianSwiss                = 63,
  315.     verAlternateGr                = 64,
  316.     verCroatia                    = 68
  317. };
  318.  
  319. enum {
  320.     minCountry                    = verUS,
  321.     maxCountry                    = verCroatia                    /* changed from verAlternateGr when additional enums added */
  322. };
  323.  
  324. /* Obsolete region code names, kept for backward compatibility */
  325. enum {
  326.     verBelgiumLux                = 6,                            /* (use verFrBelgiumLux instead, less ambiguous) */
  327.     verArabia                    = 16,
  328.     verYugoslavia                = 25,                            /* (use verYugoCroatian instead, less ambiguous) */
  329.     verIndia                    = 33,                            /* (use verIndiaHindi instead, less ambiguous) */
  330. /* Calendar Codes */
  331.     calGregorian                = 0,
  332.     calArabicCivil                = 1,
  333.     calArabicLunar                = 2,
  334.     calJapanese                    = 3,
  335.     calJewish                    = 4,
  336.     calCoptic                    = 5,
  337.     calPersian                    = 6,
  338. /* Integer Format Codes */
  339.     intWestern                    = 0,
  340.     intArabic                    = 1,
  341.     intRoman                    = 2,
  342.     intJapanese                    = 3,
  343.     intEuropean                    = 4,
  344.     intOutputMask                = 0x8000,
  345. /* CharByte byte types */
  346.     smSingleByte                = 0,
  347.     smFirstByte                    = -1,
  348.     smLastByte                    = 1,
  349.     smMiddleByte                = 2,
  350. /* CharType field masks */
  351.     smcTypeMask                    = 0x000F,
  352.     smcReserved                    = 0x00F0
  353. };
  354.  
  355. enum {
  356.     smcClassMask                = 0x0F00,
  357.     smcOrientationMask            = 0x1000,                        /*two-byte script glyph orientation*/
  358.     smcRightMask                = 0x2000,
  359.     smcUpperMask                = 0x4000,
  360.     smcDoubleMask                = 0x8000,
  361. /* Basic CharType character types */
  362.     smCharPunct                    = 0x0000,
  363.     smCharAscii                    = 0x0001,
  364.     smCharEuro                    = 0x0007,
  365.     smCharExtAscii                = 0x0007,                        /* More correct synonym for smCharEuro */
  366. /* Additional CharType character types for script systems */
  367.     smCharKatakana                = 0x0002,                        /*Japanese Katakana*/
  368.     smCharHiragana                = 0x0003,                        /*Japanese Hiragana*/
  369.     smCharIdeographic            = 0x0004,                        /*Hanzi, Kanji, Hanja*/
  370.     smCharTwoByteGreek            = 0x0005,                        /*2-byte Greek in Far East systems*/
  371.     smCharTwoByteRussian        = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  372.     smCharBidirect                = 0x0008,                        /*Arabic/Hebrew*/
  373.     smCharContextualLR            = 0x0009,                        /*Contextual left-right: Thai, Indic scripts*/
  374.     smCharNonContextualLR        = 0x000A,                        /*Non-contextual left-right: Cyrillic, Greek*/
  375.     smCharHangul                = 0x000C,                        /*Korean Hangul*/
  376.     smCharJamo                    = 0x000D,                        /*Korean Jamo*/
  377.     smCharBopomofo                = 0x000E,                        /*Chinese Bopomofo*/
  378. /* old names for some of above, for backward compatibility */
  379.     smCharFISKana                = 0x0002,                        /*Katakana*/
  380.     smCharFISGana                = 0x0003,                        /*Hiragana*/
  381.     smCharFISIdeo                = 0x0004                        /*Hanzi, Kanji, Hanja*/
  382. };
  383.  
  384. enum {
  385.     smCharFISGreek                = 0x0005,                        /*2-byte Greek in Far East systems*/
  386.     smCharFISRussian            = 0x0006,                        /*2-byte Cyrillic in Far East systems*/
  387. /* CharType classes for punctuation (smCharPunct) */
  388.     smPunctNormal                = 0x0000,
  389.     smPunctNumber                = 0x0100,
  390.     smPunctSymbol                = 0x0200,
  391.     smPunctBlank                = 0x0300,
  392. /* Additional CharType classes for punctuation in two-byte systems */
  393.     smPunctRepeat                = 0x0400,                        /* repeat marker */
  394.     smPunctGraphic                = 0x0500,                        /* line graphics */
  395. /* CharType Katakana and Hiragana classes for two-byte systems */
  396.     smKanaSmall                    = 0x0100,                        /*small kana character*/
  397.     smKanaHardOK                = 0x0200,                        /*can have dakuten*/
  398.     smKanaSoftOK                = 0x0300,                        /*can have dakuten or han-dakuten*/
  399. /* CharType Ideographic classes for two-byte systems */
  400.     smIdeographicLevel1            = 0x0000,                        /*level 1 char*/
  401.     smIdeographicLevel2            = 0x0100,                        /*level 2 char*/
  402.     smIdeographicUser            = 0x0200,                        /*user char*/
  403. /* old names for above, for backward compatibility */
  404.     smFISClassLvl1                = 0x0000,                        /*level 1 char*/
  405.     smFISClassLvl2                = 0x0100,                        /*level 2 char*/
  406.     smFISClassUser                = 0x0200,                        /*user char*/
  407. /* CharType Jamo classes for Korean systems */
  408.     smJamoJaeum                    = 0x0000,                        /*simple consonant char*/
  409.     smJamoBogJaeum                = 0x0100,                        /*complex consonant char*/
  410.     smJamoMoeum                    = 0x0200                        /*simple vowel char*/
  411. };
  412.  
  413. enum {
  414.     smJamoBogMoeum                = 0x0300,                        /*complex vowel char*/
  415. /* CharType glyph orientation for two-byte systems */
  416.     smCharHorizontal            = 0x0000,                        /* horizontal character form, or for both */
  417.     smCharVertical                = 0x1000,                        /* vertical character form */
  418. /* CharType directions */
  419.     smCharLeft                    = 0x0000,
  420.     smCharRight                    = 0x2000,
  421. /* CharType case modifers */
  422.     smCharLower                    = 0x0000,
  423.     smCharUpper                    = 0x4000,
  424. /* CharType character size modifiers (1 or multiple bytes). */
  425.     smChar1byte                    = 0x0000,
  426.     smChar2byte                    = 0x8000,
  427. /* TransliterateText target types for Roman */
  428.     smTransAscii                = 0,                            /*convert to ASCII*/
  429.     smTransNative                = 1,                            /*convert to font script*/
  430.     smTransCase                    = 0xFE,                            /*convert case for all text*/
  431.     smTransSystem                = 0xFF,                            /*convert to system script*/
  432. /* TransliterateText target types for two-byte scripts */
  433.     smTransAscii1                = 2,                            /*1-byte Roman*/
  434.     smTransAscii2                = 3,                            /*2-byte Roman*/
  435.     smTransKana1                = 4,                            /*1-byte Japanese Katakana*/
  436.     smTransKana2                = 5                                /*2-byte Japanese Katakana*/
  437. };
  438.  
  439. enum {
  440.     smTransGana2                = 7,                            /*2-byte Japanese Hiragana (no 1-byte Hiragana)*/
  441.     smTransHangul2                = 8,                            /*2-byte Korean Hangul*/
  442.     smTransJamo2                = 9,                            /*2-byte Korean Jamo*/
  443.     smTransBopomofo2            = 10,                            /*2-byte Chinese Bopomofo*/
  444. /* TransliterateText target modifiers */
  445.     smTransLower                = 0x4000,                        /*target becomes lowercase*/
  446.     smTransUpper                = 0x8000,                        /*target becomes uppercase*/
  447. /* TransliterateText resource format numbers */
  448.     smTransRuleBaseFormat        = 1,                            /*Rule based trsl resource format */
  449.     smTransHangulFormat            = 2,                            /*Table based Hangul trsl resource format*/
  450. /* TransliterateText property flags */
  451.     smTransPreDoubleByting        = 1,                            /*Convert all text to double byte before transliteration*/
  452.     smTransPreLowerCasing        = 2,                            /*Convert all text to lower case before transliteration*/
  453. /* TransliterateText source mask - general */
  454.     smMaskAll                    = 0xFFFFFFFFL,                    /*Convert all text*/
  455. /* TransliterateText source masks */
  456.     smMaskAscii                    = 0x00000001,                    /*2^smTransAscii*/
  457.     smMaskNative                = 0x00000002,                    /*2^smTransNative*/
  458. /* TransliterateText source masks for two-byte scripts */
  459.     smMaskAscii1                = 0x00000004,                    /*2^smTransAscii1*/
  460.     smMaskAscii2                = 0x00000008,                    /*2^smTransAscii2*/
  461.     smMaskKana1                    = 0x00000010,                    /*2^smTransKana1*/
  462.     smMaskKana2                    = 0x00000020,                    /*2^smTransKana2*/
  463.     smMaskGana2                    = 0x00000080,                    /*2^smTransGana2*/
  464.     smMaskHangul2                = 0x00000100,                    /*2^smTransHangul2*/
  465.     smMaskJamo2                    = 0x00000200,                    /*2^smTransJamo2*/
  466.     smMaskBopomofo2                = 0x00000400                    /*2^smTransBopomofo2*/
  467. };
  468.  
  469. enum {
  470. /* Result values from GetScriptManagerVariable and SetScriptManagerVariable calls. */
  471.     smNotInstalled                = 0,                            /*routine not available in script*/
  472.     smBadVerb                    = -1,                            /*Bad verb passed to a routine*/
  473.     smBadScript                    = -2                            /*Bad script code passed to a routine*/
  474. };
  475.  
  476. enum {
  477. /* Values for script redraw flag. */
  478.     smRedrawChar                = 0,                            /*Redraw character only*/
  479.     smRedrawWord                = 1,                            /*Redraw entire word (2-byte systems)*/
  480.     smRedrawLine                = -1,                            /*Redraw entire line (bidirectional systems)*/
  481. /* GetScriptManagerVariable and SetScriptManagerVariable verbs */
  482.     smVersion                    = 0,                            /*Script Manager version number*/
  483.     smMunged                    = 2,                            /*Globals change count*/
  484.     smEnabled                    = 4,                            /*Count of enabled scripts, incl Roman*/
  485.     smBidirect                    = 6,                            /*At least one bidirectional script*/
  486.     smFontForce                    = 8,                            /*Force font flag*/
  487.     smIntlForce                    = 10,                            /*Force intl flag*/
  488.     smForced                    = 12,                            /*Script was forced to system script*/
  489.     smDefault                    = 14,                            /*Script was defaulted to Roman script*/
  490.     smPrint                        = 16,                            /*Printer action routine*/
  491.     smSysScript                    = 18,                            /*System script*/
  492.     smLastScript                = 20,                            /*Last keyboard script*/
  493.     smKeyScript                    = 22,                            /*Keyboard script*/
  494.     smSysRef                    = 24,                            /*System folder refNum*/
  495.     smKeyCache                    = 26,                            /*obsolete*/
  496.     smKeySwap                    = 28,                            /*Swapping table handle*/
  497.     smGenFlags                    = 30,                            /*General flags long*/
  498.     smOverride                    = 32                            /*Script override flags*/
  499. };
  500.  
  501. enum {
  502.     smCharPortion                = 34,                            /*Ch vs SpExtra proportion*/
  503. /* New for System 7.0: */
  504.     smDoubleByte                = 36,                            /*Flag for double-byte script installed*/
  505.     smKCHRCache                    = 38,                            /*Returns pointer to KCHR cache*/
  506.     smRegionCode                = 40,                            /*Returns current region code (verXxx)*/
  507.     smKeyDisableState            = 42,                            /*Returns current keyboard disable state*/
  508. /* GetScriptVariable and SetScriptVariable verbs.
  509. Note: Verbs private to script systems are negative, while
  510. those general across script systems are non-negative. */
  511.     smScriptVersion                = 0,                            /*Script software version*/
  512.     smScriptMunged                = 2,                            /*Script entry changed count*/
  513.     smScriptEnabled                = 4,                            /*Script enabled flag*/
  514.     smScriptRight                = 6,                            /*Right to left flag*/
  515.     smScriptJust                = 8,                            /*Justification flag*/
  516.     smScriptRedraw                = 10,                            /*Word redraw flag*/
  517.     smScriptSysFond                = 12,                            /*Preferred system font*/
  518.     smScriptAppFond                = 14,                            /*Preferred Application font*/
  519.     smScriptBundle                = 16,                            /*Beginning of itlb verbs*/
  520.     smScriptNumber                = 16,                            /*Script itl0 id*/
  521.     smScriptDate                = 18,                            /*Script itl1 id*/
  522.     smScriptSort                = 20,                            /*Script itl2 id*/
  523.     smScriptFlags                = 22,                            /*flags word*/
  524.     smScriptToken                = 24,                            /*Script itl4 id*/
  525.     smScriptEncoding            = 26,                            /*id of optional itl5, if present*/
  526.     smScriptLang                = 28                            /*Current language for script*/
  527. };
  528.  
  529. enum {
  530.     smScriptNumDate                = 30,                            /*Script Number/Date formats.*/
  531.     smScriptKeys                = 32,                            /*Script KCHR id*/
  532.     smScriptIcon                = 34,                            /*ID # of SICN or kcs#/kcs4/kcs8 suite*/
  533.     smScriptPrint                = 36,                            /*Script printer action routine*/
  534.     smScriptTrap                = 38,                            /*Trap entry pointer*/
  535.     smScriptCreator                = 40,                            /*Script file creator*/
  536.     smScriptFile                = 42,                            /*Script file name*/
  537.     smScriptName                = 44,                            /*Script name*/
  538. /* There is a hole here for old Kanji private verbs 46-76 
  539.  
  540.  New for System 7.0: */
  541.     smScriptMonoFondSize        = 78,                            /*default monospace FOND (hi) & size (lo)*/
  542.     smScriptPrefFondSize        = 80,                            /*preferred FOND (hi) & size (lo)*/
  543.     smScriptSmallFondSize        = 82,                            /*default small FOND (hi) & size (lo)*/
  544.     smScriptSysFondSize            = 84,                            /*default system FOND (hi) & size (lo)*/
  545.     smScriptAppFondSize            = 86,                            /*default app FOND (hi) & size (lo)*/
  546.     smScriptHelpFondSize        = 88,                            /*default Help Mgr FOND (hi) & size (lo)*/
  547.     smScriptValidStyles            = 90,                            /*mask of valid styles for script*/
  548.     smScriptAliasStyle            = 92,                            /*style (set) to use for aliases*/
  549. /* Special script code values for International Utilities */
  550.     iuSystemScript                = -1,                            /* <obsolete>  system script */
  551.     iuCurrentScript                = -2,                            /* <obsolete>  current script (for font of grafPort) */
  552. /* Negative verbs for KeyScript */
  553.     smKeyNextScript                = -1,                            /* Switch to next available script */
  554.     smKeySysScript                = -2,                            /* Switch to the system script */
  555.     smKeySwapScript                = -3,                            /* Switch to previously-used script */
  556. /* New for System 7.0: */
  557.     smKeyNextKybd                = -4                            /* Switch to next keyboard in current keyscript */
  558. };
  559.  
  560. enum {
  561.     smKeySwapKybd                = -5,                            /* Switch to previously-used keyboard in current keyscript */
  562.     smKeyDisableKybds            = -6,                            /* Disable keyboards not in system or Roman script */
  563.     smKeyEnableKybds            = -7,                            /* Re-enable keyboards for all enabled scripts */
  564.     smKeyToggleInline            = -8,                            /* Toggle inline input for current keyscript */
  565.     smKeyToggleDirection        = -9,                            /* Toggle default line direction (TESysJust) */
  566.     smKeyNextInputMethod        = -10,                            /* Switch to next input method in current keyscript */
  567.     smKeySwapInputMethod        = -11,                            /* Switch to last-used input method in current keyscript */
  568.     smKeyDisableKybdSwitch        = -12,                            /* Disable switching from the current keyboard */
  569.     smKeySetDirLeftRight        = -15,                            /* Set default line dir to left-right, align left */
  570.     smKeySetDirRightLeft        = -16,                            /* Set default line dir to right-left, align right */
  571.     smKeyRoman                    = -17,                            /* Set keyscript to Roman. Does nothing if Roman-only
  572.                                         system, unlike KeyScript(smRoman) which forces
  573.                                         an update to current default Roman keyboard */
  574. /* Bits in the smScriptFlags word
  575. (bits above 8 are non-static) */
  576.     smsfIntellCP                = 0,                            /*Script has intelligent cut & paste*/
  577.     smsfSingByte                = 1,                            /*Script has only single bytes*/
  578.     smsfNatCase                    = 2,                            /*Native chars have upper & lower case*/
  579.     smsfContext                    = 3,                            /*Script is contextual*/
  580.     smsfNoForceFont                = 4,                            /*Script will not force characters*/
  581.     smsfB0Digits                = 5,                            /*Script has alternate digits at B0-B9*/
  582.     smsfAutoInit                = 6,                            /*Auto initialize the script*/
  583.     smsfUnivExt                    = 7,                            /*Script is handled by universal extension*/
  584.     smsfSynchUnstyledTE            = 8,                            /*Script synchronizes for unstyled TE*/
  585.     smsfForms                    = 13,                            /*Uses contextual forms for letters*/
  586.     smsfLigatures                = 14,                            /*Uses contextual ligatures*/
  587.     smsfReverse                    = 15,                            /*Reverses native text, right-left*/
  588. /* Bits in the smGenFlags long.
  589. First (high-order) byte is set from itlc flags byte. */
  590.     smfShowIcon                    = 31,                            /*Show icon even if only one script*/
  591.     smfDualCaret                = 30,                            /*Use dual caret for mixed direction text*/
  592.     smfNameTagEnab                = 29,                            /*Reserved for internal use*/
  593.     smfUseAssocFontInfo            = 28                            /*Use the associated font info for FontMetrics calls <48>*/
  594. };
  595.  
  596. enum {
  597. /* Roman script constants 
  598.  The following are here for backward compatibility, but should not be used. 
  599.  This information should be obtained using GetScript. */
  600.     romanSysFond                = 0x3FFF,                        /*system font id number*/
  601.     romanAppFond                = 3,                            /*application font id number*/
  602.     romanFlags                    = 0x0007,                        /*roman settings*/
  603. /* Script Manager font equates. */
  604.     smFondStart                    = 0x4000,                        /*start from 16K*/
  605.     smFondEnd                    = 0xC000,                        /*past end of range at 48K*/
  606. /* Miscellaneous font equates. */
  607.     smUprHalfCharSet            = 0x80,                            /*first char code in top half of std char set*/
  608. /* Character Set Extensions */
  609.     diaeresisUprY                = 0xD9,
  610.     fraction                    = 0xDA,
  611.     intlCurrency                = 0xDB,
  612.     leftSingGuillemet            = 0xDC,
  613.     rightSingGuillemet            = 0xDD,
  614.     fiLigature                    = 0xDE,
  615.     flLigature                    = 0xDF,
  616.     dblDagger                    = 0xE0,
  617.     centeredDot                    = 0xE1,
  618.     baseSingQuote                = 0xE2,
  619.     baseDblQuote                = 0xE3,
  620.     perThousand                    = 0xE4,
  621.     circumflexUprA                = 0xE5
  622. };
  623.  
  624. enum {
  625.     circumflexUprE                = 0xE6,
  626.     acuteUprA                    = 0xE7,
  627.     diaeresisUprE                = 0xE8,
  628.     graveUprE                    = 0xE9,
  629.     acuteUprI                    = 0xEA,
  630.     circumflexUprI                = 0xEB,
  631.     diaeresisUprI                = 0xEC,
  632.     graveUprI                    = 0xED,
  633.     acuteUprO                    = 0xEE,
  634.     circumflexUprO                = 0xEF,
  635.     appleLogo                    = 0xF0,
  636.     graveUprO                    = 0xF1,
  637.     acuteUprU                    = 0xF2,
  638.     circumflexUprU                = 0xF3,
  639.     graveUprU                    = 0xF4,
  640.     dotlessLwrI                    = 0xF5,
  641.     circumflex                    = 0xF6,
  642.     tilde                        = 0xF7,
  643.     macron                        = 0xF8,
  644.     breveMark                    = 0xF9
  645. };
  646.  
  647. enum {
  648.     overDot                        = 0xFA,
  649.     ringMark                    = 0xFB,
  650.     cedilla                        = 0xFC,
  651.     doubleAcute                    = 0xFD,
  652.     ogonek                        = 0xFE,
  653.     hachek                        = 0xFF,
  654. /* TokenType values */
  655.     tokenIntl                    = 4,                            /*the itl resource number of the tokenizer*/
  656.     tokenEmpty                    = -1                            /*used internally as an empty flag*/
  657. };
  658.  
  659. enum {
  660.     tokenUnknown                = 0,                            /*chars that do not match a defined token type*/
  661.     tokenWhite                    = 1,                            /*white space*/
  662.     tokenLeftLit                = 2,                            /*literal begin*/
  663.     tokenRightLit                = 3,                            /*literal end*/
  664.     tokenAlpha                    = 4,                            /*alphabetic*/
  665.     tokenNumeric                = 5,                            /*numeric*/
  666.     tokenNewLine                = 6,                            /*new line*/
  667.     tokenLeftComment            = 7,                            /*open comment*/
  668.     tokenRightComment            = 8,                            /*close comment*/
  669.     tokenLiteral                = 9,                            /*literal*/
  670.     tokenEscape                    = 10,                            /*character escape (e.g. '\' in "\n", "\t")*/
  671.     tokenAltNum                    = 11,                            /*alternate number (e.g. $B0-B9 in Arabic,Hebrew)*/
  672.     tokenRealNum                = 12,                            /*real number*/
  673.     tokenAltReal                = 13,                            /*alternate real number*/
  674.     tokenReserve1                = 14,                            /*reserved*/
  675.     tokenReserve2                = 15,                            /*reserved*/
  676.     tokenLeftParen                = 16,                            /*open parenthesis*/
  677.     tokenRightParen                = 17,                            /*close parenthesis*/
  678.     tokenLeftBracket            = 18,                            /*open square bracket*/
  679.     tokenRightBracket            = 19                            /*close square bracket*/
  680. };
  681.  
  682. enum {
  683.     tokenLeftCurly                = 20,                            /*open curly bracket*/
  684.     tokenRightCurly                = 21,                            /*close curly bracket*/
  685.     tokenLeftEnclose            = 22,                            /*open guillemet*/
  686.     tokenRightEnclose            = 23,                            /*close guillemet*/
  687.     tokenPlus                    = 24,
  688.     tokenMinus                    = 25,
  689.     tokenAsterisk                = 26,                            /*times/multiply*/
  690.     tokenDivide                    = 27,
  691.     tokenPlusMinus                = 28,                            /*plus or minus symbol*/
  692.     tokenSlash                    = 29,
  693.     tokenBackSlash                = 30,
  694.     tokenLess                    = 31,                            /*less than symbol*/
  695.     tokenGreat                    = 32,                            /*greater than symbol*/
  696.     tokenEqual                    = 33,
  697.     tokenLessEqual2                = 34,                            /*less than or equal, 2 characters (e.g. <=)*/
  698.     tokenLessEqual1                = 35,                            /*less than or equal, 1 character*/
  699.     tokenGreatEqual2            = 36,                            /*greater than or equal, 2 characters (e.g. >=)*/
  700.     tokenGreatEqual1            = 37,                            /*greater than or equal, 1 character*/
  701.     token2Equal                    = 38,                            /*double equal (e.g. ==)*/
  702.     tokenColonEqual                = 39                            /*colon equal*/
  703. };
  704.  
  705. enum {
  706.     tokenNotEqual                = 40,                            /*not equal, 1 character*/
  707.     tokenLessGreat                = 41,                            /*less/greater, Pascal not equal (e.g. <>)*/
  708.     tokenExclamEqual            = 42,                            /*exclamation equal, C not equal (e.g. !=)*/
  709.     tokenExclam                    = 43,                            /*exclamation point*/
  710.     tokenTilde                    = 44,                            /*centered tilde*/
  711.     tokenComma                    = 45,
  712.     tokenPeriod                    = 46,
  713.     tokenLeft2Quote                = 47,                            /*open double quote*/
  714.     tokenRight2Quote            = 48,                            /*close double quote*/
  715.     tokenLeft1Quote                = 49,                            /*open single quote*/
  716.     tokenRight1Quote            = 50,                            /*close single quote*/
  717.     token2Quote                    = 51,                            /*double quote*/
  718.     token1Quote                    = 52,                            /*single quote*/
  719.     tokenSemicolon                = 53,
  720.     tokenPercent                = 54,
  721.     tokenCaret                    = 55,
  722.     tokenUnderline                = 56,
  723.     tokenAmpersand                = 57,
  724.     tokenAtSign                    = 58,
  725.     tokenBar                    = 59                            /*vertical bar*/
  726. };
  727.  
  728. enum {
  729.     tokenQuestion                = 60,
  730.     tokenPi                        = 61,                            /*lower-case pi*/
  731.     tokenRoot                    = 62,                            /*square root symbol*/
  732.     tokenSigma                    = 63,                            /*capital sigma*/
  733.     tokenIntegral                = 64,                            /*integral sign*/
  734.     tokenMicro                    = 65,
  735.     tokenCapPi                    = 66,                            /*capital pi*/
  736.     tokenInfinity                = 67,
  737.     tokenColon                    = 68,
  738.     tokenHash                    = 69,                            /*e.g. #*/
  739.     tokenDollar                    = 70,
  740.     tokenNoBreakSpace            = 71,                            /*non-breaking space*/
  741.     tokenFraction                = 72,
  742.     tokenIntlCurrency            = 73,
  743.     tokenLeftSingGuillemet        = 74,
  744.     tokenRightSingGuillemet        = 75,
  745.     tokenPerThousand            = 76,
  746.     tokenEllipsis                = 77,
  747.     tokenCenterDot                = 78,
  748.     tokenNil                    = 127
  749. };
  750.  
  751. enum {
  752.     delimPad                    = -2,
  753. /* obsolete, misspelled token names kept for backward compatibility */
  754.     tokenTilda                    = 44,
  755.     tokenCarat                    = 55
  756. };
  757.  
  758. enum {
  759. /* Table selectors for GetItlTable */
  760.     smWordSelectTable            = 0,                            /* get word select break table from 'itl2' */
  761.     smWordWrapTable                = 1,                            /* get word wrap break table from 'itl2' */
  762.     smNumberPartsTable            = 2,                            /* get default number parts table from 'itl4' */
  763.     smUnTokenTable                = 3,                            /* get unToken table from 'itl4' */
  764.     smWhiteSpaceList            = 4,                            /* get white space list from 'itl4' */
  765.     iuWordSelectTable            = 0,                            /* <obsolete>  get word select break table from 'itl2' */
  766.     iuWordWrapTable                = 1,                            /* <obsolete>  get word wrap break table from 'itl2' */
  767.     iuNumberPartsTable            = 2,                            /* <obsolete>  get default number parts table from 'itl4' */
  768.     iuUnTokenTable                = 3,                            /* <obsolete>  get unToken table from 'itl4' */
  769.     iuWhiteSpaceList            = 4                                /* <obsolete>  get white space list from 'itl4' */
  770. };
  771.  
  772. /* end of stuff moved from Packages.h */
  773. enum {
  774.     tokenOK,                                                    /* TokenResults */
  775.     tokenOverflow,                                                /* TokenResults */
  776.     stringOverflow,                                                /* TokenResults */
  777.     badDelim,                                                    /* TokenResults */
  778.     badEnding,                                                    /* TokenResults */
  779.     crash                                                        /* TokenResults */
  780. };
  781.  
  782. typedef SInt8 TokenResults;
  783.  
  784. typedef char CharByteTable[256];
  785.  
  786. typedef short TokenType;
  787.  
  788. typedef TokenType DelimType[2];
  789.  
  790. typedef TokenType CommentType[4];
  791.  
  792. struct TokenRec {
  793.     TokenType                        theToken;
  794.     Ptr                                position;                    /*pointer into original source*/
  795.     long                            length;                        /*length of text in original source*/
  796.     StringPtr                        stringPosition;                /*Pascal/C string copy of identifier*/
  797. };
  798. typedef struct TokenRec TokenRec;
  799.  
  800. typedef TokenRec *TokenRecPtr;
  801.  
  802. struct TokenBlock {
  803.     Ptr                                source;                        /*pointer to stream of characters*/
  804.     long                            sourceLength;                /*length of source stream*/
  805.     Ptr                                tokenList;                    /*pointer to array of tokens*/
  806.     long                            tokenLength;                /*maximum length of TokenList*/
  807.     long                            tokenCount;                    /*number tokens generated by tokenizer*/
  808.     Ptr                                stringList;                    /*pointer to stream of identifiers*/
  809.     long                            stringLength;                /*length of string list*/
  810.     long                            stringCount;                /*number of bytes currently used*/
  811.     Boolean                            doString;                    /*make strings & put into StringList*/
  812.     Boolean                            doAppend;                    /*append to TokenList rather than replace*/
  813.     Boolean                            doAlphanumeric;                /*identifiers may include numeric*/
  814.     Boolean                            doNest;                        /*do comments nest?*/
  815.     TokenType                        leftDelims[2];
  816.     TokenType                        rightDelims[2];
  817.     TokenType                        leftComment[4];
  818.     TokenType                        rightComment[4];
  819.     TokenType                        escapeCode;                    /*escape symbol code*/
  820.     TokenType                        decimalCode;
  821.     Handle                            itlResource;                /*handle to itl4 resource of current script*/
  822.     long                            reserved[8];                /*must be zero!*/
  823. };
  824. typedef struct TokenBlock TokenBlock;
  825.  
  826. typedef TokenBlock *TokenBlockPtr;
  827.  
  828. extern pascal short GetSysDirection( void )
  829.     TWOWORDINLINE( 0x3EB8, 0x0BAC ); /* MOVE.w $0BAC,(SP) */
  830. extern pascal void SetSysDirection( short value )
  831.     TWOWORDINLINE( 0x31DF, 0x0BAC ); /* MOVE.w (SP)+,$0BAC */
  832. extern pascal short FontScript(void)
  833.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0000, 0xA8B5);
  834. extern pascal short IntlScript(void)
  835.  FOURWORDINLINE(0x2F3C, 0x8200, 0x0002, 0xA8B5);
  836. extern pascal void KeyScript(short code)
  837.  FOURWORDINLINE(0x2F3C, 0x8002, 0x0004, 0xA8B5);
  838. extern pascal short CharByte(Ptr textBuf, short textOffset)
  839.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0010, 0xA8B5);
  840. extern pascal short CharType(Ptr textBuf, short textOffset)
  841.  FOURWORDINLINE(0x2F3C, 0x8206, 0x0012, 0xA8B5);
  842. extern pascal Boolean IsCmdChar(const EventRecord *event, short test)
  843.  FOURWORDINLINE(0x2F3C, 0x8206, 0xFFD0, 0xA8B5);
  844. extern pascal OSErr Transliterate(Handle srcHandle, Handle dstHandle, short target, long srcMask)
  845.  FOURWORDINLINE(0x2F3C, 0x820E, 0x0018, 0xA8B5);
  846. extern pascal Boolean ParseTable(CharByteTable table)
  847.  FOURWORDINLINE(0x2F3C, 0x8204, 0x0022, 0xA8B5);
  848. extern pascal TokenResults IntlTokenize(TokenBlockPtr tokenParam)
  849.  FOURWORDINLINE(0x2F3C, 0x8204, 0xFFFA, 0xA8B5);
  850. extern pascal short FontToScript(short fontNumber)
  851.  FOURWORDINLINE(0x2F3C, 0x8202, 0x0006, 0xA8B5);
  852. extern pascal long GetScriptManagerVariable(short selector)
  853.  FOURWORDINLINE(0x2F3C, 0x8402, 0x0008, 0xA8B5);
  854. extern pascal OSErr SetScriptManagerVariable(short selector, long param)
  855.  FOURWORDINLINE(0x2F3C, 0x8206, 0x000A, 0xA8B5);
  856. extern pascal long GetScriptVariable(short script, short selector)
  857.  FOURWORDINLINE(0x2F3C, 0x8404, 0x000C, 0xA8B5);
  858. extern pascal OSErr SetScriptVariable(short script, short selector, long param)
  859.  FOURWORDINLINE(0x2F3C, 0x8208, 0x000E, 0xA8B5);
  860. /*  New for 7.1  */
  861. extern pascal UniversalProcPtr GetScriptUtilityAddress(short selector, Boolean Before, ScriptCode script)
  862.  FOURWORDINLINE(0x2F3C, 0xC404, 0x0038, 0xA8B5);
  863. extern pascal void SetScriptUtilityAddress(short selector, Boolean Before, UniversalProcPtr routineAddr, ScriptCode script)
  864.  FOURWORDINLINE(0x2F3C, 0xC008, 0x003A, 0xA8B5);
  865. extern pascal UniversalProcPtr GetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, ScriptCode script)
  866.  FOURWORDINLINE(0x2F3C, 0xC406, 0x003C, 0xA8B5);
  867. extern pascal void SetScriptQDPatchAddress(short trapNum, Boolean Before, Boolean forPrinting, UniversalProcPtr routineAddr, ScriptCode script)
  868.  FOURWORDINLINE(0x2F3C, 0xC00A, 0x003E, 0xA8B5);
  869. extern pascal short CharacterByteType(Ptr textBuf, short textOffset, ScriptCode script)
  870.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0010, 0xA8B5);
  871. extern pascal short CharacterType(Ptr textBuf, short textOffset, ScriptCode script)
  872.  FOURWORDINLINE(0x2F3C, 0xC206, 0x0012, 0xA8B5);
  873. extern pascal OSErr TransliterateText(Handle srcHandle, Handle dstHandle, short target, long srcMask, ScriptCode script)
  874.  FOURWORDINLINE(0x2F3C, 0xC20E, 0x0018, 0xA8B5);
  875. extern pascal Boolean FillParseTable(CharByteTable table, ScriptCode script)
  876.  FOURWORDINLINE(0x2F3C, 0xC204, 0x0022, 0xA8B5);
  877. /* Moved from Packages.h */
  878. extern pascal Handle GetIntlResource(short theID)
  879.  THREEWORDINLINE(0x3F3C, 0x0006, 0xA9ED);
  880. extern pascal void SetIntlResource(short refNum, short theID, Handle intlHandle)
  881.  THREEWORDINLINE(0x3F3C, 0x0008, 0xA9ED);
  882. extern pascal void ClearIntlResourceCache(void)
  883.  THREEWORDINLINE(0x3F3C, 0x0018, 0xA9ED);
  884. extern pascal void GetIntlResourceTable(ScriptCode script, short tableCode, Handle *itlHandle, long *offset, long *length)
  885.  THREEWORDINLINE(0x3F3C, 0x0024, 0xA9ED);
  886. #if OLDROUTINENAMES
  887. #define SetSysJust(newJust) SetSysDirection(newJust)
  888. #define GetSysJust() GetSysDirection()
  889. #define Font2Script(fontNumber) FontToScript(fontNumber)
  890. #define GetEnvirons(verb) GetScriptManagerVariable(verb)
  891. #define SetEnvirons(verb, param) SetScriptManagerVariable(verb, param)
  892. #define GetScript(script, verb) GetScriptVariable(script, verb)
  893. #define SetScript(script, verb, param) SetScriptVariable(script, verb, param)
  894. #define IUGetIntl(theID) GetIntlResource(theID)
  895. #define IUSetIntl(refNum, theID, intlHandle) SetIntlResource(refNum, theID, intlHandle)
  896. #define IUClearCache() ClearIntlResourceCache()
  897. #define IUGetItlTable(script, tableCode, itlHandle, offset, length)  \
  898.     GetIntlResourceTable(script, tableCode, itlHandle, offset, length)
  899. #endif
  900.  
  901. #if PRAGMA_IMPORT_SUPPORTED
  902. #pragma import off
  903. #endif
  904.  
  905. #if PRAGMA_ALIGN_SUPPORTED
  906. #pragma options align=reset
  907. #endif
  908.  
  909. #ifdef __cplusplus
  910. }
  911. #endif
  912.  
  913. #endif /* __SCRIPT__ */
  914.